import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysUserRoleService } from './sys_user_role.service';
import { CreateSysUserRoleDto } from './dto/create-sys_user_role.dto';
import { UpdateSysUserRoleDto } from './dto/update-sys_user_role.dto';

@Controller('sys-user-role')
export class SysUserRoleController {
  constructor(private readonly sysUserRoleService: SysUserRoleService) {}

  @Post()
  create(@Body() createSysUserRoleDto: CreateSysUserRoleDto) {
    return this.sysUserRoleService.create(createSysUserRoleDto);
  }

  @Get()
  findAll() {

    return this.sysUserRoleService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysUserRoleService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysUserRoleDto: UpdateSysUserRoleDto) {
    return this.sysUserRoleService.update(id, updateSysUserRoleDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysUserRoleService.remove(id);
  }
}
